Skip to content

Conversation

@jankaluza
Copy link

@jankaluza jankaluza commented Sep 1, 2025

These go packages were migrated to a monorepo, as stated in the https://blog.podman.io/2025/08/migration-to-the-container-libs-monorepo-is-complete/.

This commit updates the crc package to use these packages from new locations.

It was generated using following commands:

$ find . -type f -name '*.go' -exec sed -i -e 's,"github.com/containers/image,"go.podman.io/image,g' {} \;
$ find . -type f -name '*.go' -exec sed -i -e 's,"github.com/containers/common,"go.podman.io/common,g' {} \;
$ find . -type f -name '*.go' -exec sed -i -e 's,"github.com/containers/storage,"go.podman.io/storage,g' {} \;
$ goimports -v -w .
$ git checkout vendor/
$ vi go.mod # to change the storage, image and common imports
$ go mod tidy
$ go mod vendor

Summary by CodeRabbit

  • Chores
    • Updated internal dependency for shared utilities to a newer provider to keep package alignment and compatibility.
    • Adjusted imports to reference the updated shared utilities package; no public APIs or user-facing behavior changed.

✏️ Tip: You can customize this high-level summary in your review settings.

@openshift-ci openshift-ci bot requested review from cfergeau and lstocchi September 1, 2025 13:37
@coderabbitai
Copy link

coderabbitai bot commented Sep 1, 2025

Walkthrough

Migration of a module dependency from github.com/containers/common to go.podman.io/common in go.mod, and an import update in pkg/config/config.go to use the new module path and version.

Changes

Cohort / File(s) Summary
Dependency Migration
go.mod
Removed direct dependency github.com/containers/common v0.64.2; added direct dependency go.podman.io/common v0.66.1; removed indirect go.podman.io/common v0.66.0 // indirect
Import Path Update
pkg/config/config.go
Changed import from github.com/containers/common/pkg/strongunits to go.podman.io/common/pkg/strongunits (no API/signature changes)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A little hop to a newer lane,
Strongunits moved, the code's the same.
Pods and modules, tidy and neat,
A nimble rabbit taps its feet. 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: migrating from containers/* to go.podman.io modules, which is the primary focus of the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7abf49f and 06f33d2.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • go.mod
  • pkg/config/config.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/config/config.go
🔇 Additional comments (1)
go.mod (1)

20-20: Dependency migration to go.podman.io/common v0.66.1 is correct and follows official Podman guidance.

The version v0.66.1 is the published migration target for the official containers-libs consolidation. The change from github.com/containers/common v0.64.2 to go.podman.io/common v0.66.1 correctly follows the canonical import path announced by the Podman project. Since only the common module is a direct dependency of vfkit, no additional modules (image, storage) are required in go.mod—they would appear as transitive dependencies if needed.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci
Copy link

openshift-ci bot commented Sep 1, 2025

Hi @jankaluza. Thanks for your PR.

I'm waiting for a crc-org member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ec2c483 and 3fa3255.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • go.mod (3 hunks)
  • pkg/config/config.go (1 hunks)
🔇 Additional comments (5)
go.mod (5)

22-22: Good: added go.podman.io/common

This aligns with the monorepo migration. Consider pinning to a tagged release if/when available for reproducibility (pseudo-versions are fine short-term).


20-20: Testify upgrade looks fine

No concerns; incremental test-only dependency bump.


72-72: x/net bump observed

Incidental to the migration; low risk but keep an eye on any net/http2 behavior changes in CI.


37-37: Confirm no direct legacy github.com/containers/... imports remain. The rg search produced no matches; please manually verify that none are hidden in vendored or generated files.


16-16: Confirmed direct import of gopsutil—no change needed
The package github.com/shirou/gopsutil/v4/process is imported in pkg/process/process.go (line 27), so the direct require in go.mod is valid and should remain.

@openshift-ci
Copy link

openshift-ci bot commented Jan 9, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign vyasgun for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cfergeau
Copy link
Collaborator

cfergeau commented Jan 9, 2026

I’ve redone the commit against latest main using your instructions and force pushed to your branch.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pkg/config/virtio.go (1)

455-484: Clarify the “old vs new syntax” comment in VirtioNet.ToCmdLine (currently reads inconsistent/unfinished).
The logic looks fine, but the comment is hard to trust as written (and appears to miss a closing parenthesis).

Proposed comment fix
-		if dev.VfkitMagic {
-			// use the old syntax for backward compatibility (newer pkg/config code generating the command line for a vfkit release without support for the new syntax
-			// https://github.com/containers/podman/issues/27873
+		if dev.VfkitMagic {
+			// Use the legacy `unixSocketPath=` option when vfkit "magic" is enabled, to stay compatible
+			// with vfkit builds that don't support the newer `type=unixgram,path=...` syntax.
+			// https://github.com/containers/podman/issues/27873
 			fmt.Fprintf(&builder, ",unixSocketPath=%s", dev.UnixSocketPath)
 		} else {
 			builder.WriteString(",type=unixgram")
 			fmt.Fprintf(&builder, ",path=%s", dev.UnixSocketPath)
 			builder.WriteString(",vfkitMagic=off")
 		}
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3fa3255 and e14b4cb.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (4)
  • go.mod
  • pkg/config/config.go
  • pkg/config/virtio.go
  • pkg/config/virtio_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/config/config.go
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: nirs
Repo: crc-org/vfkit PR: 0
File: :0-0
Timestamp: 2025-10-12T15:51:07.560Z
Learning: In the vfkit virtio-net code (pkg/vf/virtionet.go), the connectUnixPath function change was about closing the connection after duplication (since conn.File() already duplicates the fd), not about introducing the duplication itself.
📚 Learning: 2025-10-12T15:51:07.560Z
Learnt from: nirs
Repo: crc-org/vfkit PR: 0
File: :0-0
Timestamp: 2025-10-12T15:51:07.560Z
Learning: In the vfkit virtio-net code (pkg/vf/virtionet.go), the connectUnixPath function change was about closing the connection after duplication (since conn.File() already duplicates the fd), not about introducing the duplication itself.

Applied to files:

  • pkg/config/virtio_test.go
  • pkg/config/virtio.go
🔇 Additional comments (3)
pkg/config/virtio_test.go (1)

272-278: Test expectations correctly track the new VirtioNet.ToCmdLine normalization to unixSocketPath= when vfkit magic is on/default.
The updated golden strings still keep coverage for the vfkitMagic=off path where type=unixgram,path=... is emitted.

Also applies to: 393-406, 407-416, 417-426, 461-470

pkg/config/virtio.go (1)

479-481: Mac emission change is a clean readability win.
fmt.Fprintf(&builder, ...) keeps the formatting consistent with the rest of the method.

go.mod (1)

20-20: Container-libs migration is complete. No lingering github.com/containers/* imports remain, all code uses go.podman.io/common, and v0.66.0 is a valid released version. No vendor metadata inconsistencies to address.

These go packages were migrated to a monorepo, as stated in the https://blog.podman.io/2025/08/migration-to-the-container-libs-monorepo-is-complete/.

This commit updates the crc package to use these packages from new locations.

It was generated using following commands:

```
$ find . -type f -name '*.go' -exec sed -i -e 's,"github.com/containers/image,"go.podman.io/image,g' {} \;
$ find . -type f -name '*.go' -exec sed -i -e 's,"github.com/containers/common,"go.podman.io/common,g' {} \;
$ find . -type f -name '*.go' -exec sed -i -e 's,"github.com/containers/storage,"go.podman.io/storage,g' {} \;
$ goimports -v -w .
$ git checkout vendor/
$ vi go.mod # to change the storage, image and common imports
$ go mod tidy
$ go mod vendor
```

Signed-off-by: Jan Kaluza <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants